package com.zuihai.app.mvp.model.api.login;

import com.zuihai.app.mvp.model.entity.BaseJson;
import com.zuihai.app.mvp.model.entity.BaseMainClass;
import com.zuihai.app.mvp.model.entity.LoginMainBean;
import com.zuihai.app.mvp.model.entity.LoginResult;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2017/5/22 0022.
 */

public interface IRegist {
    //注册请求验证码
    @FormUrlEncoded
    @POST("Yanzhengma")
    Observable<BaseMainClass> getVerification(@Field("phone") String phoneNumber);

    //发送注册时的内容
    @FormUrlEncoded
    @POST("RegistInq")
    Observable<BaseMainClass> registRight(@Field("yanzhengma") String yanzhengma,
                                          @Field("phone") String phone,
                                          @Field("password") String password);
    //忘记密码获取验证码
    @FormUrlEncoded
    @POST("Yanzhengma_Repassword")
    Observable<BaseMainClass> getResetPasswordVerification(@Field("phone") String phoneNumber);


    @FormUrlEncoded
    @POST("LoginInq")
    Observable<BaseJson<LoginResult>> phoneNumberLogin(@Field("phone") String phone,
                                                       @Field("password") String password);

    @FormUrlEncoded
    @POST("LoginInq")
    Observable<LoginMainBean> phoneNewNumberLogin(@Field("phone") String phone,
                                                   @Field("password") String password);

    //确认验证码并注册
    @FormUrlEncoded
    @POST("Judge_Yanzhengma")
    Observable<BaseMainClass> judgeYanzhengmaRegister(@Field("phone") String phoneNumber,
                                                      @Field("password") String password,
                                                      @Field("yanzhengma") String yanzhengma);

    //修改密码获取验证码
    @FormUrlEncoded
    @POST("Yanzhengma_Repassword")
    Observable<BaseMainClass> yanzhengmaRepassword(@Field("phone") String phoneNumber);

    //修改密码确认验证码
    @FormUrlEncoded
    @POST("Judge_Yanzhengma_Repass")
    Observable<BaseMainClass> yanzhengmaRepasswordRight(
            @Field("yanzhengma") String yanzhengma,
            @Field("phone") String phone);

    //修改密码
    @FormUrlEncoded
    @POST("RePasswordInq")
    Observable<BaseMainClass> resetPassword(@Field("phone") String phoneNumber,
                                         @Field("password") String password);


}
